home *** CD-ROM | disk | FTP | other *** search
/ il gioco del Kamasutra / Milo Manara Kamasutra.iso / mac / DATA / ParteIII / GameI / Spada.dir / 00037_Script_37 < prev    next >
Text File  |  1997-11-24  |  3KB  |  84 lines

  1. on mouseEnter
  2.   set the cursor of sprite 40 to [the number of cast "MouseOpen", the number of cast "MouseOpenMask"]
  3. end mouseEnte
  4.  
  5.  
  6. on mouseleave
  7.   
  8.   set the visible of sprite 40 to 0
  9.   
  10. end mouseleave
  11.  
  12.  
  13. on mousedown
  14.   
  15.   global oldloc, x0, y0, x1, y1
  16.   puppetsprite 40, true
  17.   set the cursor of sprite 40 to [the number of cast "MouseClose", the number of cast "MouseCloseMask"]
  18.   set x0 = the loch of sprite 40
  19.   set y0 = the locv of sprite 40
  20.   repeat while the stilldown
  21.     set the loc of sprite 40 to point(the mouseH,the mouseV)
  22.     updatestage
  23.   end repeat
  24.   Puppetsound 3,"Click2"
  25. end mousedown
  26.  
  27. on mouseUp
  28.   global oldloc, x0, y0, x1, y1
  29.   global oldloc, DonnaTesto1, DonnaTesto2, DonnaTesto3, DonnaCard1, DonnaCard2, DonnaCard3
  30.   global Coppia1, Coppia2, Coppia3, Test1, Test2, Test3
  31.   set the cursor of sprite 40 to [the number of cast "MouseOpen", the number of cast "MouseOpenMask"]
  32.   if (Test1 = 0) and (inside(the loc of sprite 40, the rect of sprite 17 ) = 1) then
  33.     set the loc of sprite 40 to oldloc
  34.     puppetsprite 40, 0
  35.     set the membernum of sprite 24 to (the membernum of sprite 40)
  36.     set the loc of sprite 24 to point(172, 361)
  37.     set DonnaCard1 = the name of member (the membernum of sprite 40)  
  38.     set the text of member 20 to "Donna " & (the name of member (the membernum of sprite 40))
  39.     put the text of member 20 into DonnaTesto1
  40.     updatestage
  41.   else if (Test2 = 0) and (inside(the loc of sprite 40, the rect of sprite 18 ) = 1) then
  42.     set the loc of sprite 40 to oldloc
  43.     puppetsprite 40, 0
  44.     set the membernum of sprite 25 to (the membernum of sprite 40)
  45.     set the loc of sprite 25 to point(362, 361)
  46.     set DonnaCard2 = the name of member (the membernum of sprite 40)
  47.     set the text of member 21 to "Donna " & (the name of member (the membernum of sprite 40))
  48.     put the text of member 21 into DonnaTesto2
  49.     updatestage
  50.   else if (Test3 = 0) and (inside(the loc of sprite 40, the rect of sprite 19 ) = 1) then
  51.     set the loc of sprite 40 to oldloc
  52.     puppetsprite 40, 0
  53.     set the membernum of sprite 26 to (the membernum of sprite 40)
  54.     set the loc of sprite 26 to point(552, 361)
  55.     set DonnaCard3 = the name of member (the membernum of sprite 40)
  56.     set the text of member 22 to "Donna " & (the name of member (the membernum of sprite 40))
  57.     put the text of member 22 into DonnaTesto3
  58.     updatestage
  59.   else
  60.     put the loch of sprite 40 into x1
  61.     put the locv of sprite 40 into y1
  62.     set passo = integer(abs(x1-x0))
  63.     if x1 <> x0 then
  64.       if x1 > x0 then
  65.         repeat with n = 20 down to 1
  66.           set the loch of sprite 40 = (x1 - passo/n)
  67.           set the locv of sprite 40 = ((y1-y0)*(x1 - passo/n) + (x1*y0 -x0*y1))/(x1-x0)
  68.           updatestage
  69.         end repeat
  70.       else
  71.         repeat with n = 20 down to 1
  72.           set the loch of sprite 40 = (x1 + passo/n)
  73.           set the locv of sprite 40 = ((y1-y0)*(x1 + passo/n) + (x1*y0 -x0*y1))/(x1-x0)
  74.           updatestage
  75.         end repeat
  76.       end if
  77.     end if
  78.     set the loch of sprite 40 = x0
  79.     set the locv of sprite 40 = y0
  80.     updatestage
  81.   end if
  82.   
  83. end mouseUp
  84.